<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    //闭包——函数中用到除 
    function foo() {
      var a = 123;
      return function () {
        debugger;
        let b = a;
      }
    }
    foo()();
  </script>
</body>

</html>